// ******************************************************************
// * Copyright(c)  Steven Lu
// * Description   : Entity_MST_LOCATION
// * CreateDate    : 2011/8/16 10:16:40
// * Creater       : CodeSmith
// * LastChangeDate: 2011/8/16 10:16:40
// * LastChanger   : 2011/8/16 10:16:40
// * Version Info  : 1.0 For ESOL
// ******************************************************************

using System;
using System.Data;
using System.Collections.Generic;
using System.Text;
using Suzsoft.Smart.EntityCore;
using ESOL.Common.Schema;

namespace ESOL.Common.Entity
{
	[Serializable]
	public partial class MstLocationEntity : EntityBase
    {
        public MstLocationTable TableSchema
        {
            get
            {
                return MstLocationTable.Current;
            }
		}
		
		public MstLocationEntity()
        {

        }
		
		public MstLocationEntity(DataRow dr)
        {
			if(dr == null)
			{
				return;
			}
			this.LocationId = Convert.ToString(CommonFunctions.ToObject(dr["LOCATION_ID"]));
			this.WarehouseCode = Convert.ToString(CommonFunctions.ToObject(dr["WAREHOUSE_CODE"]));
			this.LocationCode = Convert.ToString(CommonFunctions.ToObject(dr["LOCATION_CODE"]));
			this.LocationName = Convert.ToString(CommonFunctions.ToObject(dr["LOCATION_NAME"]));
			this.Description = Convert.ToString(CommonFunctions.ToObject(dr["DESCRIPTION"]));
            this.Isusered = Convert.ToInt32(CommonFunctions.ToObject(dr["ISUSERED"]));
        }
		
		public MstLocationEntity(DataRowView dr)
        {
			if(dr == null)
			{
				return;
			}
			this.LocationId = Convert.ToString(CommonFunctions.ToObject(dr["LOCATION_ID"]));
			this.WarehouseCode = Convert.ToString(CommonFunctions.ToObject(dr["WAREHOUSE_CODE"]));
			this.LocationCode = Convert.ToString(CommonFunctions.ToObject(dr["LOCATION_CODE"]));
			this.LocationName = Convert.ToString(CommonFunctions.ToObject(dr["LOCATION_NAME"]));
			this.Description = Convert.ToString(CommonFunctions.ToObject(dr["DESCRIPTION"]));
            this.Isusered = Convert.ToInt32(CommonFunctions.ToObject(dr["ISUSERED"]));
        }

        public override TableInfo OringTableSchema
        {
            get
            {
                return MstLocationTable.Current;
            }
        }
		
		#region Perporty List
        public string LocationId
        {
            get { return Convert.ToString(GetData(MstLocationTable.C_LOCATION_ID)); }
            set { SetData(MstLocationTable.C_LOCATION_ID, value); }
        }
		
        public string WarehouseCode
        {
            get { return Convert.ToString(GetData(MstLocationTable.C_WAREHOUSE_CODE)); }
            set { SetData(MstLocationTable.C_WAREHOUSE_CODE, value); }
        }
		
        public string LocationCode
        {
            get { return Convert.ToString(GetData(MstLocationTable.C_LOCATION_CODE)); }
            set { SetData(MstLocationTable.C_LOCATION_CODE, value); }
        }
		
        public string LocationName
        {
            get { return Convert.ToString(GetData(MstLocationTable.C_LOCATION_NAME)); }
            set { SetData(MstLocationTable.C_LOCATION_NAME, value); }
        }
		
        public string Description
        {
            get { return Convert.ToString(GetData(MstLocationTable.C_DESCRIPTION)); }
            set { SetData(MstLocationTable.C_DESCRIPTION, value); }
        }
        public int Isusered
        {
            get { return Convert.ToInt32(GetData(MstLocationTable.C_ISUSERED)); }
            set { SetData(MstLocationTable.C_ISUSERED, value); }
        }
		#endregion
	}
	
	
}	

